import request from "@/utils/request";
/* 移除门店下员工 */
export function unbindStudent(schoolId, userId) {
  return request({
    url: `/manager/account/unbindStudent/${schoolId}/${userId}`,
    method: "delete",
  });
}
/* 移除管理员 */
export function unbindSchoolAdmin(schoolId, userId) {
  return request({
    url: `/manager/account/unbindSchoolManager/${schoolId}/${userId}`,
    method: "put",
  });
}
/* 设置管理员账号 */
export function setSchoolAdmin(data) {
  return request({
    url: "/manager/account/setSchoolAdmin",
    method: "put",
    data: data,
  });
}
/* 通过手机号码获取 账号 */
export function getAccountByPhone(phone) {
  return request({
    url: "/manager/account/student/phone/" + phone,
    method: "get",
  });
}
// 获取学生成绩详情
export function gradesDetail(data) {
  return request({
    url: "/manager/account/score/detail",
    method: "get",
    params: data,
  });
}
// 学生-获取学习详细信息
export function studentStudyData(id) {
  return request({
    url: "/manager/account/studentStudyData/" + id,
    method: "get",
  });
}
// 学生-获取学生课程学习记录
export function studentCourses(query) {
  return request({
    url: "/manager/account/studentCourses",
    method: "get",
    params: query,
  });
}
// 学生-校验教师数量
export function checkStudentNum(query) {
  return request({
    url: "/manager/account/checkStudentNum",
    method: "get",
    params: query,
  });
}
// 查询审核列表

export function mainAndManagerlist(query) {
  return request({
    url: "/manager/account/mainAndManagerList",
    method: "get",
    params: query,
  });
}
// 门店管理员列表
export function schoolManagerlist(query) {
  return request({
    url: "/manager/account/schoolManagerList",
    method: "get",
    params: query,
  });
}
// 查询列表
export function listPost_student(query) {
  return request({
    url: "/manager/account/student/list",
    method: "get",
    params: query,
  });
}

// 查询员工详细by stuid
export function getPost_student(postId) {
  return request({
    url: "/manager/account/student/" + postId,
    method: "get",
  });
}
// 查询详细详细by userid
export function getPost_user(postId) {
  return request({
    url: "/getUserInfo/" + postId,
    method: "get",
  });
}
// 新增
export function addPost_student(data) {
  return request({
    url: "/manager/account/student",
    method: "post",
    data: data,
  });
}
// 学生-导入列表
export function import_student(data) {
  return request({
    url: "/manager/account/student/import",
    method: "post",
    data: data,
  });
}
// 导出错误导入的员工列表
export function errorExportDown(data) {
  return request({
    url: "/manager/account/student/errorExport",
    method: "post",
    data: data,
  });
}
// 密码重置
export function addPost_resetPwd(postId) {
  return request({
    url: "/system/user/resetPwd",
    method: "put",
    data: { userId: postId },
  });
}
// 状态修改
export function addPost_changeStatus(data) {
  return request({
    url: "/manager/account/student/changeStatus",
    method: "post",
    headers: {
      "Content-Type": "application/x-www-form-urlencoded",
    },
    data: data,
  });
}

// 修改
export function updatePost_student(data) {
  return request({
    url: "/manager/account/student",
    method: "put",
    data: data,
  });
}

// 删除
export function delPost_student(postId) {
  return request({
    url: "/manager/account/student/" + postId,
    method: "delete",
  });
}
